package com.guigu.www.controller;


import com.guigu.www.pojo.HealthManager;
import com.guigu.www.service.HealthManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author DengHao
 * @since 2021-10-20
 */
@RestController
@RequestMapping("/CommonHealthManager")
public class HealthManagerController {

    @Autowired
    private HealthManagerService healthManagerService;


    @PostMapping("/login")
    public HealthManager login(String hmUsername,String hmPassword){
        return healthManagerService.login(hmUsername,hmPassword);
    }

    @PostMapping("/queryPhone")
    public HealthManager queryPhone(String hmPhone){
        return healthManagerService.queryPhone(hmPhone);
    }

    // 登录忘记密码修改密码的方法
    @PutMapping("/upPasswordMethod")
    public Integer upPasswordMethod(String pass,Integer hmId){
        return healthManagerService.upPasswordMethod(hmId,pass);
    }
}

